package com.guli.edu.client;

import com.guli.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author ZHAOZHENYU
 * @since 2022/9/29
 * feign远程调用vod的删除方法
 */

// 追加熔断器
@FeignClient(value = "service-vod",fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodClient {

    // @PathVariable注解一定要指定参数名称，否则出错
    @DeleteMapping("/vod/video/{videoId}")
    public R removeVideo(@PathVariable("videoId") String videoId);

    @DeleteMapping("/vod/video/deleteBatch")
    public R deleteBatch(@RequestParam("videoIdList")List<String> videoIdList);

}
